/*!
 * Ext JS Library 3.4.0
 * Copyright(c) 2006-2011 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */
Ext.onReady(function() {
    Ext.QuickTips.init();
    var form = new Ext.form.FormPanel({
        renderTo: 'orCollect',
        //labelAlign: 'top',
        //title   : '需求收集',
        autoHeight: true,
        width   : 600,
        bodyStyle: 'padding: 10px',
        defaults: {
           	anchor :'-20',
            width: 230
        },
        items:[{
      		xtype: 'fieldset',
     		title: '客户基础信息',
        	collapsible: false,
    		items: [{
           	 	layout:'column',
           	 	border:false,
            	items:[{
                	columnWidth:1/2,
                	layout: 'form',
                	border:false,
                	labelWidth: 70, 
                	
                	items: [companyText,industryComb,customerNameText,phoneText]
            	},{
	                columnWidth:1/2,
	                layout: 'form',
	                border:false,
	                labelWidth: 70, 
	                items: [areaComb,subdivideMarketComb,customerDepartmentText]
	            }]
	      	}]
	      },{
      		xtype: 'fieldset',
     		title: '基础信息',
        	collapsible: false,
        	defaults: {
           		anchor :'-20',
           	 	width: 230
        	},
        	items: [{
           	 	layout:'column',
           	 	border:false,
            	items:[{
                	columnWidth:1/2,
                	layout: 'form',
                	border:false,
                	labelWidth: 70, 
                	items: [collectionWayComb,requireTypeComb,busiActText]
            	},{
	                columnWidth:1/2,
	                layout: 'form',
	                border:false,
	                labelWidth: 70, 
	                items: [importanceComb,urgencyComb]
	            }]
	      	},customerProDesArea,operSceneDesArea,label,
	      	whyText,whoText,whenText,whereText,whatText,howText,experienceText,productDisText]
        },{
      		xtype: 'fieldset',
     		title: '产品信息',
        	//collapsible: true,
    		items: [{
           	 	layout:'column',
           	 	border:false,
            	items:[{
                	columnWidth:1/2,
                	layout: 'form',
                	border:false,
                	labelWidth: 70, 
                	items: [productLineComb,hardwareVerText]
            	},{
	                columnWidth:1/2,
	                layout: 'form',
	                border:false,
	                labelWidth: 70, 
	                items: [targetProductsCombo,softwareVerText]
	            }]
         	}]
        }],
        buttons: [
            {
                text   : '提交',
                handler: function() {
                  	if(form.form.isValid()){
                  		friendAlert("已经提交");
                  	}else{
                  		friendAlert("请填写完整数据");
                  	}
                }
            },
            {
                text   : '重置',
                handler: function() {
                	form.form.reset();
                }
            },
            
            {
                text   : '保存到草稿',
                handler: function() {
                   friendAlert("待开发功能");
                }
            }
        ]
    });
});